|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.device.KeyMapManager
public class KeyMapManager
Object used to remap key and button events. Note: this class only working on Android 5.1 and Android 4.3 (FW version 20160929 and Higher).
| Nested Class Summary | |
|---|---|
class |
KeyMapManager.KeyEntry
Describes the keys provided by button event and their associated labels. |
| Field Summary | |
|---|---|
static int |
KEY_TYPE_KEYCODE
This mask is used to remap new keycode FUNCTION. |
static int |
KEY_TYPE_STARTAC
This mask is used to remap special actions to start APPS FUNCTION. |
| Constructor Summary | |
|---|---|
KeyMapManager(Context context)
|
|
| Method Summary | |
|---|---|
void |
delKeyEntry(int scancode)
Delete the Button key remap. |
void |
disableInterception(boolean interception)
disable or enable system remap Button key event. |
java.lang.String |
getKeyAction(int scancode)
Returns special actions if this scan code is a KeyEvent keycode. |
int |
getKeyCode(int scancode)
Returns new keycode if this scan code is a KeyEvent keycode. |
java.util.List<KeyMapManager.KeyEntry> |
getKeyList()
Returns all remap keys describes. |
int |
getKeyMeta(int scancode)
|
int |
getKeytype(int scancode)
Returns ramap type if this scan code is a KeyEvent keycode. |
boolean |
hasKeyEntry(int scancode)
Returns the Button key remap state. |
boolean |
isInterception()
Returns true if enable system remap Button key event. |
void |
mapKeyEntry(KeyEvent event,
int keytype,
java.lang.String meta)
Create a new key event remap that is the same as the given one, but whose keycode is replaced with the given value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEY_TYPE_KEYCODE
This mask is used to remap new keycode FUNCTION.
public static final int KEY_TYPE_STARTAC
This mask is used to remap special actions to start APPS FUNCTION.
| Constructor Detail |
|---|
public KeyMapManager(Context context)
| Method Detail |
|---|
public boolean hasKeyEntry(int scancode)
Returns the Button key remap state.
scancode - android.view.KeyEvent#getScanCode()
public void delKeyEntry(int scancode)
Delete the Button key remap.
scancode - android.view.KeyEvent#getScanCode()
public void mapKeyEntry(KeyEvent event,
int keytype,
java.lang.String meta)
event - the button key event android.view.KeyEventkeytype - such as KEY_TYPE_KEYCODE or KEY_TYPE_STARTAC.meta - new keycode or special actions to start APPSandroid.content.Intentpublic boolean isInterception()
public void disableInterception(boolean interception)
interception - true disable remap KeyEvent, false otherwise.public int getKeyCode(int scancode)
scancode - android.view.KeyEvent#getScanCode()
public int getKeyMeta(int scancode)
public java.lang.String getKeyAction(int scancode)
scancode - android.view.KeyEvent#getScanCode()
android.content.Intent, null otherwisepublic int getKeytype(int scancode)
scancode - android.view.KeyEvent#getScanCode()
KEY_TYPE_KEYCODE or KEY_TYPE_STARTAC, -1 otherwisepublic java.util.List<KeyMapManager.KeyEntry> getKeyList()
KeyMapManager.KeyEntry, null otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||